package cn.iocoder.yudao.module.erp.controller.admin.strategy.uniqueNo;

import cn.hutool.core.util.ObjUtil;
import cn.iocoder.yudao.module.erp.dal.dataobject.inout.outbound.saleout.SaleOutDO;
import cn.iocoder.yudao.module.erp.dal.mysql.inout.outbound.saleout.SaleOutMapper;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author Max-u-19
 */
@Component("UniqueSaleOutNo")
public class UniqueSaleOutNo implements UniqueNoStrategy{

    @Resource
    private SaleOutMapper saleOutMapper;
    @Override
    public Boolean uniqueNo(String no) {
        SaleOutDO saleOutDO = saleOutMapper.selectByNO(no);
        return ObjUtil.isNotEmpty(saleOutDO);
    }
}
